CHECK FOR UNDERSTANDING: Let's look at those symbols again!

We've used if statements to test when two things are equal, but we can also use them to compare values.

  • Click Run and guess the number. Then use the code to answer the questions.

Greater Than: If your guess is > the random number, the sprite says, "Nope! Too high!"

Less Than: If your guess is < the random number, the sprite says, "Nope! Too low!"

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)